package com.utils;

import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.util.Base64;

import java.io.ByteArrayOutputStream;

public class StringUtils {
    public static String getPace(float speed) {
        if (speed <= 0) {
            return "0'00''";
        }
        float s = 1000f / speed;
        int v1 = (int) (s / 60);
        int v2 = (int) (1000f / speed % 60);
        return v1 + "'" + v2 + "''";
    }
    public static String convertMillisToHMS(long milliseconds) {
        long seconds = (milliseconds / 1000) % 60;
        long minutes = ((milliseconds / (1000 * 60)) % 60);
        long hours = (milliseconds / (1000 * 60 * 60));

        return String.format("%d:%02d:%02d", hours, minutes, seconds);
    }

}
